﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Store Manager/SM_panel.master" AutoEventWireup="true" CodeFile="SM_GRNEdit.aspx.cs" Inherits="Store_Manager_SM_GRNEdit" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" 
        ClientIDMode="AutoID" CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" 
        CssPostfix="BlackGlass" DataSourceID="SqlDataSource1" KeyFieldName="Or_ID" 
        Width="100%">
        <Columns>
            <dx:GridViewCommandColumn VisibleIndex="0">
                <EditButton Visible="True">
                </EditButton>
                <ClearFilterButton Visible="True">
                </ClearFilterButton>
            </dx:GridViewCommandColumn>
            <dx:GridViewDataTextColumn Caption="GRN Code" FieldName="Or_ID" ReadOnly="True" 
                VisibleIndex="0">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="Location" Visible="False" 
                VisibleIndex="1">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Total Product" FieldName="TotalProduct" 
                ReadOnly="True" VisibleIndex="2">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Total Amount" FieldName="Total" 
                ReadOnly="True" VisibleIndex="3">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Book GRN No:" FieldName="Book_GRNno" 
                VisibleIndex="4">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataDateColumn Caption="Date" FieldName="Oder_Date" ReadOnly="True" 
                VisibleIndex="6">
            </dx:GridViewDataDateColumn>
            <dx:GridViewDataTextColumn Caption="Status" FieldName="status" ReadOnly="True" 
                VisibleIndex="7">
            </dx:GridViewDataTextColumn>
        </Columns>
        <SettingsPager PageSize="25">
        </SettingsPager>
        <Settings ShowFilterRow="True" />
        <Images SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css">
            <LoadingPanelOnStatusBar Url="~/App_Themes/BlackGlass/GridView/gvLoadingOnStatusBar.gif">
            </LoadingPanelOnStatusBar>
            <LoadingPanel Url="~/App_Themes/BlackGlass/GridView/Loading.gif">
            </LoadingPanel>
        </Images>
        <ImagesFilterControl>
            <LoadingPanel Url="~/App_Themes/BlackGlass/Editors/Loading.gif">
            </LoadingPanel>
        </ImagesFilterControl>
        <Styles CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" 
            CssPostfix="BlackGlass">
            <Header ImageSpacing="5px" SortingImageSpacing="5px">
            </Header>
        </Styles>
        <StylesEditors>
            <CalendarHeader Spacing="1px">
            </CalendarHeader>
            <ProgressBar Height="25px">
            </ProgressBar>
        </StylesEditors>
    </dx:ASPxGridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
        DeleteCommand="DELETE FROM [Tbl_GRN] WHERE [Or_ID] = @Or_ID" 
        InsertCommand="INSERT INTO [Tbl_GRN] ([Or_ID], [Oder_Date], [Location], [TotalProduct], [Total], [status], [Book_GRNno]) VALUES (@Or_ID, @Oder_Date, @Location, @TotalProduct, @Total, @status, @Book_GRNno)" 
        SelectCommand="SELECT [Or_ID], [Oder_Date], [Location], [TotalProduct], [Total], [status], [Book_GRNno] FROM [Tbl_GRN]" 
        UpdateCommand="UPDATE [Tbl_GRN] SET [Oder_Date] = @Oder_Date, [Location] = @Location, [TotalProduct] = @TotalProduct, [Total] = @Total, [status] = @status, [Book_GRNno] = @Book_GRNno WHERE [Or_ID] = @Or_ID">
        <DeleteParameters>
            <asp:Parameter Name="Or_ID" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="Or_ID" Type="Int32" />
            <asp:Parameter DbType="Date" Name="Oder_Date" />
            <asp:Parameter Name="Location" Type="String" />
            <asp:Parameter Name="TotalProduct" Type="Int32" />
            <asp:Parameter Name="Total" Type="String" />
            <asp:Parameter Name="status" Type="String" />
            <asp:Parameter Name="Book_GRNno" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter DbType="Date" Name="Oder_Date" />
            <asp:Parameter Name="Location" Type="String" />
            <asp:Parameter Name="TotalProduct" Type="Int32" />
            <asp:Parameter Name="Total" Type="String" />
            <asp:Parameter Name="status" Type="String" />
            <asp:Parameter Name="Book_GRNno" Type="String" />
            <asp:Parameter Name="Or_ID" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
</asp:Content>

